#include "xD3D9Help.h"

namespace XE
{



	const  D3DVERTEXELEMENT9* xD3D9Help::CastToD3DvertexElement9(const  xVertexDeclaration* pvd)
	{
         if(pvd==NULL)
			 return NULL;
		 return   ( const D3DVERTEXELEMENT9*)&pvd->GetElementVector()[0];
	}


	//const  D3DMATERIAL9* xD3D9Help::ToMaterial(const xPass* pPass)
	//{
	//	if (pPass==NULL)
	//	{
	//		return  NULL;
	//	}
	//	static D3DMATERIAL9 d3d9material;
	//	d3d9material.Ambient = pPass->m_Ambient;
	//	d3d9material.Diffuse = pPass->m_Diffuse;
	//	d3d9material.Emissive = pPass->m_Emissive;
	//	d3d9material.Specular = pPass->m_Specular;
	//	d3d9material.Power = pPass->m_power;
	//	return &d3d9material;
	//}
}